---
title: Line Height
description: Adjust the height between lines of text.
docs:
  - route: /docs/components/line-height-dropdown-menu
    title: Line Height Dropdown Menu
---

<ComponentPreview name="playground-demo" id="lineheight" />

<PackageInfo>

## Features

- Set line height for selected blocks.

</PackageInfo>

## Installation

```bash
npm install @udecode/plate-line-height
```

## Usage

```tsx
import { LineHeightPlugin } from '@udecode/plate-line-height/react';

const plugins = [
  // ...otherPlugins,
  LineHeightPlugin,
];
```

## Plugins

### LineHeightPlugin

## API

### setLineHeight

Sets the line height for selected nodes in the editor.

<APIParameters>
  <APIItem name="editor" type="PlateEditor">
    The editor instance.
  </APIItem>
  <APIItem name="options" type="object">
    The options for setting the line height.
    <APISubList>
      <APISubListItem parent="options" name="value" type="number">
        The line height value to be set.
      </APISubListItem>
      <APISubListItem
        parent="options"
        name="setNodesOptions"
        type="SetNodesOptions"
      >
        Additional options for setting nodes.
      </APISubListItem>
    </APISubList>
  </APIItem>
</APIParameters>

## API Components

### useLineHeightDropdownMenu

The behavior hook for the line height dropdown menu.

<APIState>
  <APIItem name="value" type="number">
    The line height value.
  </APIItem>
</APIState>

<APIReturns>
  <APIItem name="radioGroupProps" type="object">
    The props for the radio group.
    <APISubList>
      <APISubListItem parent="radioGroupProps" name="value" type="string">
        The line height value.
      </APISubListItem>
      <APISubListItem
        parent="radioGroupProps"
        name="onValueChange"
        type="function"
      >
        Callback to set the line height value.
      </APISubListItem>
    </APISubList>
  </APIItem>
</APIReturns>